<div class="form-group"
     ng-class="{'has-error': form[field.id].$invalid &&
               form[field.id].$dirty}">
  <label for="{$ field.id $}"
         class="control-label">{$ field.title $}</label>
  <span ng-if="field.desc"
        class="help-icon"
        data-container="body"
        data-html="true"
        title=""
        data-toggle="tooltip"
        data-original-title="{$ field.desc $}">
    <span class="fa fa-question-circle"></span>
  </span>
  <span ng-if="field.info"
        class="help-icon"
        data-container="body"
        data-html="true"
        title=""
        data-toggle="tooltip"
        data-original-title="{$ field.info $}">
    <span class="fa fa-info-circle"></span>
  </span>
  <span ng-if="field.required"
        class="hz-icon-required fa fa-asterisk"></span>
  <div ng-switch="field.type">
    <input ng-switch-when="input"
           type="text"
           class="form-control"
           ng-model="field.value"
           id="{$ field.id $}"
           name="{$ field.id $}"
           ng-required="field.required"
           ng-disabled="field.disabled"
           ng-pattern="field.pattern"
           ng-change="{$ field.change $}"
           placeholder="{$ field.desc $}"/>
    <div ng-switch-when="radio"
         class="btn-group"
         id="{$ field.id $}">
      <label class="btn btn-default"
             ng-model="field.value"
             ng-repeat="opt in field.options"
             ng-disabled="field.disabled"
             uib-btn-radio="opt.value">{$ opt.label $}</label>
    </div>
    <div ng-switch-when="select">
        <select id="field.id"
                class="form-control"
                ng-disabled="field.disabled"
                ng-options="{$ field.options $}"
                ng-model="field.value">
        </select>
      </div>
  </div>
</div>
